class MyComponent extends THING.Component {
  constructor(params = {}) {
    super()
    this.speed = params['speed'] || 200;
  }

  onStart() {
    console.log('MyComponent start')
  }

  onUpdate(delta) {
    // rotation
    if (this.speed) {
      let deltaY = this.speed * delta;
      this.object.rotateY(deltaY);
    }
  }

  onExport() {
    return {
      speed: this.speed
    }
  }

  static exportProperties = ['speed'];
}

export { MyComponent }
